package com.pc.service;

import com.pc.enrty.Food;
import com.pc.enrty.Viewed;

import java.util.ArrayList;

public interface ViewedService {
    /**
     * 根据uid查询浏览商品
     * @param viewed
     * @return
     */
    ArrayList<Food> findViewed(Viewed viewed);
    /**
     * 查询是否有重复
     * @param viewed
     * @return
     */
    ArrayList<Food> selectByUidAndFid(Viewed viewed);
    /**
     * 插入最近浏览商品
     * @param viewed
     * @return ==1?true:false
     */
    boolean addViewed(Viewed viewed);

    /**
     * 根据uid保留五条浏览记录,删除多余的记录
     * @param viewed
     * @return ==1?true:false
     */
    boolean removeViewed(Viewed viewed);
}
